package main

import (
	"comm"
	"fmt"
	"log4go"
)

func main() {
	//Load Conf File
	conf, err := comm.ParseConf("/root/oschina/push_go/conf/sys.conf")
	if err != nil {
		fmt.Println("ParseConf error")
		return
	}
	fmt.Println(conf.ConfLog.Conf)
	fmt.Println(conf.ConfComm.SubServer)

	// Load The Log Configuration
	log4go.LoadConfiguration(conf.ConfLog.Conf)

	defer log4go.Close()

	log4go.Debug("begin build TCP comm server")
	//Build TCP subscription Server
	comm.ServerBuild("tcp", conf.ConfComm.SubServer)
}
